/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InHiddenDanger extends BasicModel<InHiddenDanger> {
  enterpriseId?: string; // 所属企业id
  taskId?: number; // 任务Id
  inspectionTaskId?: number; // 巡检任务Id  如果是设备上报则为空
  name?: string; // 名称
  address?: string; // 地点
  abnormalPic?: string; // 异常图片
  isEquipment?: string; // 是否设备生成
  equipmentId?: string; // 设备Id
  remark?: string; // 隐患描述
  reportPerson?: string; // 上报人
  reportTime?: string; // 上报时间
  regionId?: number; // 区域Id
  addTime?: string; // 添加时间
  updateTime?: string; // 更新时间
  deleted?: string; // 是否删除
  deadline?: string; // 整改期限
  resultPic?: string; // 结果图片
  alarmResult?: string; // 报警结果  误报 已处理
  unitCode?: string; // 单位代码
  urged?: string; // 是否督促
}

export const inHiddenDangerList = (params?: InHiddenDanger | any) =>
  defHttp.get<InHiddenDanger>({ url: adminPath + '/inspectionmanag/inHiddenDanger/list', params });

export const inHiddenDangerListData = (params?: InHiddenDanger | any) =>
  defHttp.post<Page<InHiddenDanger>>({ url: adminPath + '/inspectionmanag/inHiddenDanger/listData', params });

export const inHiddenDangerForm = (params?: InHiddenDanger | any) =>
  defHttp.get<InHiddenDanger>({ url: adminPath + '/inspectionmanag/inHiddenDanger/form', params });

export const inHiddenDangerSave = (params?: any, data?: InHiddenDanger | any) =>
  defHttp.postJson<InHiddenDanger>({ url: adminPath + '/inspectionmanag/inHiddenDanger/save', params, data });

export const inHiddenDangerDelete = (params?: InHiddenDanger | any) =>
  defHttp.get<InHiddenDanger>({ url: adminPath + '/inspectionmanag/inHiddenDanger/delete', params });
